package com.myway.service.impl;

import com.myway.dao.PassengeQuestionMapper;
import com.myway.pojo.PassengeQuestion;
import com.myway.service.PQuestionService;
import com.myway.dto.util.OrderNumberGenerator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class PQuestionServiceImpl implements PQuestionService{

    @Autowired
    private PassengeQuestionMapper passengeQuestionMapper;

    @Override
    public void addPQuestion(PassengeQuestion passengeQuestion) {
        String orderNo = OrderNumberGenerator.getOrderNo()+"";
        passengeQuestion.setId(orderNo);
        passengeQuestion.setCreateTime(new Date());
        passengeQuestionMapper.insertSelective(passengeQuestion);
    }
}
